{"ast":null,"code":"import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\n\n/* eslint-disable max-classes-per-file */\nimport { getNumberPrecision, isE, num2str, trimNumber, validateNumber } from \"./numberUtil\";\nimport { supportBigInt } from \"./supportUtil\";\nfunction isEmpty(value) {\n  return !value && value !== 0 && !Number.isNaN(value) || !String(value).trim();\n}\n\n/**\n * We can remove this when IE not support anymore\n */\nexport var NumberDecimal = /*#__PURE__*/function () {\n  function NumberDecimal(value) {\n    _classCallCheck(this, NumberDecimal);\n    _defineProperty(this, \"origin\", '');\n    _defineProperty(this, \"number\", void 0);\n    _defineProperty(this, \"empty\", void 0);\n    if (isEmpty(value)) {\n      this.empty = true;\n      return;\n    }\n    this.origin = String(value);\n    this.number = Number(value);\n  }\n  _createClass(NumberDecimal, [{\n    key: \"negate\",\n    value: function negate() {\n      return new NumberDecimal(-this.toNumber());\n    }\n  }, {\n    key: \"add\",\n    value: function add(value) {\n      if (this.isInvalidate()) {\n        return new NumberDecimal(value);\n      }\n      var target = Number(value);\n      if (Number.isNaN(target)) {\n        return this;\n      }\n      var number = this.number + target; // [Legacy] Back to safe integer\n\n      if (number > Number.MAX_SAFE_INTEGER) {\n        return new NumberDecimal(Number.MAX_SAFE_INTEGER);\n      }\n      if (number < Number.MIN_SAFE_INTEGER) {\n        return new NumberDecimal(Number.MIN_SAFE_INTEGER);\n      }\n      var maxPrecision = Math.max(getNumberPrecision(this.number), getNumberPrecision(target));\n      return new NumberDecimal(number.toFixed(maxPrecision));\n    }\n  }, {\n    key: \"isEmpty\",\n    value: function isEmpty() {\n      return this.empty;\n    }\n  }, {\n    key: \"isNaN\",\n    value: function isNaN() {\n      return Number.isNaN(this.number);\n    }\n  }, {\n    key: \"isInvalidate\",\n    value: function isInvalidate() {\n      return this.isEmpty() || this.isNaN();\n    }\n  }, {\n    key: \"equals\",\n    value: function equals(target) {\n      return this.toNumber() === (target === null || target === void 0 ? void 0 : target.toNumber());\n    }\n  }, {\n    key: \"lessEquals\",\n    value: function lessEquals(target) {\n      return this.add(target.negate().toString()).toNumber() <= 0;\n    }\n  }, {\n    key: \"toNumber\",\n    value: function toNumber() {\n      return this.number;\n    }\n  }, {\n    key: \"toString\",\n    value: function toString() {\n      var safe = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n      if (!safe) {\n        return this.origin;\n      }\n      if (this.isInvalidate()) {\n        return '';\n      }\n      return num2str(this.number);\n    }\n  }]);\n  return NumberDecimal;\n}();\nexport var BigIntDecimal = /*#__PURE__*/function () {\n  /** BigInt will convert `0009` to `9`. We need record the len of decimal */\n  function BigIntDecimal(value) {\n    _classCallCheck(this, BigIntDecimal);\n    _defineProperty(this, \"origin\", '');\n    _defineProperty(this, \"negative\", void 0);\n    _defineProperty(this, \"integer\", void 0);\n    _defineProperty(this, \"decimal\", void 0);\n    _defineProperty(this, \"decimalLen\", void 0);\n    _defineProperty(this, \"empty\", void 0);\n    _defineProperty(this, \"nan\", void 0);\n    if (isEmpty(value)) {\n      this.empty = true;\n      return;\n    }\n    this.origin = String(value); // Act like Number convert\n\n    if (value === '-' || Number.isNaN(value)) {\n      this.nan = true;\n      return;\n    }\n    var mergedValue = value; // We need convert back to Number since it require `toFixed` to handle this\n\n    if (isE(mergedValue)) {\n      mergedValue = Number(mergedValue);\n    }\n    mergedValue = typeof mergedValue === 'string' ? mergedValue : num2str(mergedValue);\n    if (validateNumber(mergedValue)) {\n      var trimRet = trimNumber(mergedValue);\n      this.negative = trimRet.negative;\n      var numbers = trimRet.trimStr.split('.');\n      this.integer = BigInt(numbers[0]);\n      var decimalStr = numbers[1] || '0';\n      this.decimal = BigInt(decimalStr);\n      this.decimalLen = decimalStr.length;\n    } else {\n      this.nan = true;\n    }\n  }\n  _createClass(BigIntDecimal, [{\n    key: \"getMark\",\n    value: function getMark() {\n      return this.negative ? '-' : '';\n    }\n  }, {\n    key: \"getIntegerStr\",\n    value: function getIntegerStr() {\n      return this.integer.toString();\n    }\n  }, {\n    key: \"getDecimalStr\",\n    value: function getDecimalStr() {\n      return this.decimal.toString().padStart(this.decimalLen, '0');\n    }\n    /**\n     * Align BigIntDecimal with same decimal length. e.g. 12.3 + 5 = 1230000\n     * This is used for add function only.\n     */\n  }, {\n    key: \"alignDecimal\",\n    value: function alignDecimal(decimalLength) {\n      var str = \"\".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(decimalLength, '0'));\n      return BigInt(str);\n    }\n  }, {\n    key: \"negate\",\n    value: function negate() {\n      var clone = new BigIntDecimal(this.toString());\n      clone.negative = !clone.negative;\n      return clone;\n    }\n  }, {\n    key: \"add\",\n    value: function add(value) {\n      if (this.isInvalidate()) {\n        return new BigIntDecimal(value);\n      }\n      var offset = new BigIntDecimal(value);\n      if (offset.isInvalidate()) {\n        return this;\n      }\n      var maxDecimalLength = Math.max(this.getDecimalStr().length, offset.getDecimalStr().length);\n      var myAlignedDecimal = this.alignDecimal(maxDecimalLength);\n      var offsetAlignedDecimal = offset.alignDecimal(maxDecimalLength);\n      var valueStr = (myAlignedDecimal + offsetAlignedDecimal).toString(); // We need fill string length back to `maxDecimalLength` to avoid parser failed\n\n      var _trimNumber = trimNumber(valueStr),\n        negativeStr = _trimNumber.negativeStr,\n        trimStr = _trimNumber.trimStr;\n      var hydrateValueStr = \"\".concat(negativeStr).concat(trimStr.padStart(maxDecimalLength + 1, '0'));\n      return new BigIntDecimal(\"\".concat(hydrateValueStr.slice(0, -maxDecimalLength), \".\").concat(hydrateValueStr.slice(-maxDecimalLength)));\n    }\n  }, {\n    key: \"isEmpty\",\n    value: function isEmpty() {\n      return this.empty;\n    }\n  }, {\n    key: \"isNaN\",\n    value: function isNaN() {\n      return this.nan;\n    }\n  }, {\n    key: \"isInvalidate\",\n    value: function isInvalidate() {\n      return this.isEmpty() || this.isNaN();\n    }\n  }, {\n    key: \"equals\",\n    value: function equals(target) {\n      return this.toString() === (target === null || target === void 0 ? void 0 : target.toString());\n    }\n  }, {\n    key: \"lessEquals\",\n    value: function lessEquals(target) {\n      return this.add(target.negate().toString()).toNumber() <= 0;\n    }\n  }, {\n    key: \"toNumber\",\n    value: function toNumber() {\n      if (this.isNaN()) {\n        return NaN;\n      }\n      return Number(this.toString());\n    }\n  }, {\n    key: \"toString\",\n    value: function toString() {\n      var safe = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n      if (!safe) {\n        return this.origin;\n      }\n      if (this.isInvalidate()) {\n        return '';\n      }\n      return trimNumber(\"\".concat(this.getMark()).concat(this.getIntegerStr(), \".\").concat(this.getDecimalStr())).fullStr;\n    }\n  }]);\n  return BigIntDecimal;\n}();\nexport default function getMiniDecimal(value) {\n  // We use BigInt here.\n  // Will fallback to Number if not support.\n  if (supportBigInt()) {\n    return new BigIntDecimal(value);\n  }\n  return new NumberDecimal(value);\n}\n/**\n * Align the logic of toFixed to around like 1.5 => 2.\n * If set `cutOnly`, will just remove the over decimal part.\n */\n\nexport function toFixed(numStr, separatorStr, precision) {\n  var cutOnly = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n  if (numStr === '') {\n    return '';\n  }\n  var _trimNumber2 = trimNumber(numStr),\n    negativeStr = _trimNumber2.negativeStr,\n    integerStr = _trimNumber2.integerStr,\n    decimalStr = _trimNumber2.decimalStr;\n  var precisionDecimalStr = \"\".concat(separatorStr).concat(decimalStr);\n  var numberWithoutDecimal = \"\".concat(negativeStr).concat(integerStr);\n  if (precision >= 0) {\n    // We will get last + 1 number to check if need advanced number\n    var advancedNum = Number(decimalStr[precision]);\n    if (advancedNum >= 5 && !cutOnly) {\n      var advancedDecimal = getMiniDecimal(numStr).add(\"\".concat(negativeStr, \"0.\").concat('0'.repeat(precision)).concat(10 - advancedNum));\n      return toFixed(advancedDecimal.toString(), separatorStr, precision, cutOnly);\n    }\n    if (precision === 0) {\n      return numberWithoutDecimal;\n    }\n    return \"\".concat(numberWithoutDecimal).concat(separatorStr).concat(decimalStr.padEnd(precision, '0').slice(0, precision));\n  }\n  if (precisionDecimalStr === '.0') {\n    return numberWithoutDecimal;\n  }\n  return \"\".concat(numberWithoutDecimal).concat(precisionDecimalStr);\n}","map":{"version":3,"names":["_classCallCheck","_createClass","_defineProperty","getNumberPrecision","isE","num2str","trimNumber","validateNumber","supportBigInt","isEmpty","value","Number","isNaN","String","trim","NumberDecimal","empty","origin","number","key","negate","toNumber","add","isInvalidate","target","MAX_SAFE_INTEGER","MIN_SAFE_INTEGER","maxPrecision","Math","max","toFixed","equals","lessEquals","toString","safe","arguments","length","undefined","BigIntDecimal","nan","mergedValue","trimRet","negative","numbers","trimStr","split","integer","BigInt","decimalStr","decimal","decimalLen","getMark","getIntegerStr","getDecimalStr","padStart","alignDecimal","decimalLength","str","concat","padEnd","clone","offset","maxDecimalLength","myAlignedDecimal","offsetAlignedDecimal","valueStr","_trimNumber","negativeStr","hydrateValueStr","slice","NaN","fullStr","getMiniDecimal","numStr","separatorStr","precision","cutOnly","_trimNumber2","integerStr","precisionDecimalStr","numberWithoutDecimal","advancedNum","advancedDecimal","repeat"],"sources":["/Users/poppie/Desktop/development/messenger/app/frontend/node_modules/@rc-component/mini-decimal/es/MiniDecimal.js"],"sourcesContent":["import _classCallCheck from \"@babel/runtime/helpers/esm/classCallCheck\";\nimport _createClass from \"@babel/runtime/helpers/esm/createClass\";\nimport _defineProperty from \"@babel/runtime/helpers/esm/defineProperty\";\n\n/* eslint-disable max-classes-per-file */\nimport { getNumberPrecision, isE, num2str, trimNumber, validateNumber } from \"./numberUtil\";\nimport { supportBigInt } from \"./supportUtil\";\n\nfunction isEmpty(value) {\n  return !value && value !== 0 && !Number.isNaN(value) || !String(value).trim();\n}\n\n/**\n * We can remove this when IE not support anymore\n */\nexport var NumberDecimal = /*#__PURE__*/function () {\n  function NumberDecimal(value) {\n    _classCallCheck(this, NumberDecimal);\n\n    _defineProperty(this, \"origin\", '');\n\n    _defineProperty(this, \"number\", void 0);\n\n    _defineProperty(this, \"empty\", void 0);\n\n    if (isEmpty(value)) {\n      this.empty = true;\n      return;\n    }\n\n    this.origin = String(value);\n    this.number = Number(value);\n  }\n\n  _createClass(NumberDecimal, [{\n    key: \"negate\",\n    value: function negate() {\n      return new NumberDecimal(-this.toNumber());\n    }\n  }, {\n    key: \"add\",\n    value: function add(value) {\n      if (this.isInvalidate()) {\n        return new NumberDecimal(value);\n      }\n\n      var target = Number(value);\n\n      if (Number.isNaN(target)) {\n        return this;\n      }\n\n      var number = this.number + target; // [Legacy] Back to safe integer\n\n      if (number > Number.MAX_SAFE_INTEGER) {\n        return new NumberDecimal(Number.MAX_SAFE_INTEGER);\n      }\n\n      if (number < Number.MIN_SAFE_INTEGER) {\n        return new NumberDecimal(Number.MIN_SAFE_INTEGER);\n      }\n\n      var maxPrecision = Math.max(getNumberPrecision(this.number), getNumberPrecision(target));\n      return new NumberDecimal(number.toFixed(maxPrecision));\n    }\n  }, {\n    key: \"isEmpty\",\n    value: function isEmpty() {\n      return this.empty;\n    }\n  }, {\n    key: \"isNaN\",\n    value: function isNaN() {\n      return Number.isNaN(this.number);\n    }\n  }, {\n    key: \"isInvalidate\",\n    value: function isInvalidate() {\n      return this.isEmpty() || this.isNaN();\n    }\n  }, {\n    key: \"equals\",\n    value: function equals(target) {\n      return this.toNumber() === (target === null || target === void 0 ? void 0 : target.toNumber());\n    }\n  }, {\n    key: \"lessEquals\",\n    value: function lessEquals(target) {\n      return this.add(target.negate().toString()).toNumber() <= 0;\n    }\n  }, {\n    key: \"toNumber\",\n    value: function toNumber() {\n      return this.number;\n    }\n  }, {\n    key: \"toString\",\n    value: function toString() {\n      var safe = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n\n      if (!safe) {\n        return this.origin;\n      }\n\n      if (this.isInvalidate()) {\n        return '';\n      }\n\n      return num2str(this.number);\n    }\n  }]);\n\n  return NumberDecimal;\n}();\nexport var BigIntDecimal = /*#__PURE__*/function () {\n  /** BigInt will convert `0009` to `9`. We need record the len of decimal */\n  function BigIntDecimal(value) {\n    _classCallCheck(this, BigIntDecimal);\n\n    _defineProperty(this, \"origin\", '');\n\n    _defineProperty(this, \"negative\", void 0);\n\n    _defineProperty(this, \"integer\", void 0);\n\n    _defineProperty(this, \"decimal\", void 0);\n\n    _defineProperty(this, \"decimalLen\", void 0);\n\n    _defineProperty(this, \"empty\", void 0);\n\n    _defineProperty(this, \"nan\", void 0);\n\n    if (isEmpty(value)) {\n      this.empty = true;\n      return;\n    }\n\n    this.origin = String(value); // Act like Number convert\n\n    if (value === '-' || Number.isNaN(value)) {\n      this.nan = true;\n      return;\n    }\n\n    var mergedValue = value; // We need convert back to Number since it require `toFixed` to handle this\n\n    if (isE(mergedValue)) {\n      mergedValue = Number(mergedValue);\n    }\n\n    mergedValue = typeof mergedValue === 'string' ? mergedValue : num2str(mergedValue);\n\n    if (validateNumber(mergedValue)) {\n      var trimRet = trimNumber(mergedValue);\n      this.negative = trimRet.negative;\n      var numbers = trimRet.trimStr.split('.');\n      this.integer = BigInt(numbers[0]);\n      var decimalStr = numbers[1] || '0';\n      this.decimal = BigInt(decimalStr);\n      this.decimalLen = decimalStr.length;\n    } else {\n      this.nan = true;\n    }\n  }\n\n  _createClass(BigIntDecimal, [{\n    key: \"getMark\",\n    value: function getMark() {\n      return this.negative ? '-' : '';\n    }\n  }, {\n    key: \"getIntegerStr\",\n    value: function getIntegerStr() {\n      return this.integer.toString();\n    }\n  }, {\n    key: \"getDecimalStr\",\n    value: function getDecimalStr() {\n      return this.decimal.toString().padStart(this.decimalLen, '0');\n    }\n    /**\n     * Align BigIntDecimal with same decimal length. e.g. 12.3 + 5 = 1230000\n     * This is used for add function only.\n     */\n\n  }, {\n    key: \"alignDecimal\",\n    value: function alignDecimal(decimalLength) {\n      var str = \"\".concat(this.getMark()).concat(this.getIntegerStr()).concat(this.getDecimalStr().padEnd(decimalLength, '0'));\n      return BigInt(str);\n    }\n  }, {\n    key: \"negate\",\n    value: function negate() {\n      var clone = new BigIntDecimal(this.toString());\n      clone.negative = !clone.negative;\n      return clone;\n    }\n  }, {\n    key: \"add\",\n    value: function add(value) {\n      if (this.isInvalidate()) {\n        return new BigIntDecimal(value);\n      }\n\n      var offset = new BigIntDecimal(value);\n\n      if (offset.isInvalidate()) {\n        return this;\n      }\n\n      var maxDecimalLength = Math.max(this.getDecimalStr().length, offset.getDecimalStr().length);\n      var myAlignedDecimal = this.alignDecimal(maxDecimalLength);\n      var offsetAlignedDecimal = offset.alignDecimal(maxDecimalLength);\n      var valueStr = (myAlignedDecimal + offsetAlignedDecimal).toString(); // We need fill string length back to `maxDecimalLength` to avoid parser failed\n\n      var _trimNumber = trimNumber(valueStr),\n          negativeStr = _trimNumber.negativeStr,\n          trimStr = _trimNumber.trimStr;\n\n      var hydrateValueStr = \"\".concat(negativeStr).concat(trimStr.padStart(maxDecimalLength + 1, '0'));\n      return new BigIntDecimal(\"\".concat(hydrateValueStr.slice(0, -maxDecimalLength), \".\").concat(hydrateValueStr.slice(-maxDecimalLength)));\n    }\n  }, {\n    key: \"isEmpty\",\n    value: function isEmpty() {\n      return this.empty;\n    }\n  }, {\n    key: \"isNaN\",\n    value: function isNaN() {\n      return this.nan;\n    }\n  }, {\n    key: \"isInvalidate\",\n    value: function isInvalidate() {\n      return this.isEmpty() || this.isNaN();\n    }\n  }, {\n    key: \"equals\",\n    value: function equals(target) {\n      return this.toString() === (target === null || target === void 0 ? void 0 : target.toString());\n    }\n  }, {\n    key: \"lessEquals\",\n    value: function lessEquals(target) {\n      return this.add(target.negate().toString()).toNumber() <= 0;\n    }\n  }, {\n    key: \"toNumber\",\n    value: function toNumber() {\n      if (this.isNaN()) {\n        return NaN;\n      }\n\n      return Number(this.toString());\n    }\n  }, {\n    key: \"toString\",\n    value: function toString() {\n      var safe = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : true;\n\n      if (!safe) {\n        return this.origin;\n      }\n\n      if (this.isInvalidate()) {\n        return '';\n      }\n\n      return trimNumber(\"\".concat(this.getMark()).concat(this.getIntegerStr(), \".\").concat(this.getDecimalStr())).fullStr;\n    }\n  }]);\n\n  return BigIntDecimal;\n}();\nexport default function getMiniDecimal(value) {\n  // We use BigInt here.\n  // Will fallback to Number if not support.\n  if (supportBigInt()) {\n    return new BigIntDecimal(value);\n  }\n\n  return new NumberDecimal(value);\n}\n/**\n * Align the logic of toFixed to around like 1.5 => 2.\n * If set `cutOnly`, will just remove the over decimal part.\n */\n\nexport function toFixed(numStr, separatorStr, precision) {\n  var cutOnly = arguments.length > 3 && arguments[3] !== undefined ? arguments[3] : false;\n\n  if (numStr === '') {\n    return '';\n  }\n\n  var _trimNumber2 = trimNumber(numStr),\n      negativeStr = _trimNumber2.negativeStr,\n      integerStr = _trimNumber2.integerStr,\n      decimalStr = _trimNumber2.decimalStr;\n\n  var precisionDecimalStr = \"\".concat(separatorStr).concat(decimalStr);\n  var numberWithoutDecimal = \"\".concat(negativeStr).concat(integerStr);\n\n  if (precision >= 0) {\n    // We will get last + 1 number to check if need advanced number\n    var advancedNum = Number(decimalStr[precision]);\n\n    if (advancedNum >= 5 && !cutOnly) {\n      var advancedDecimal = getMiniDecimal(numStr).add(\"\".concat(negativeStr, \"0.\").concat('0'.repeat(precision)).concat(10 - advancedNum));\n      return toFixed(advancedDecimal.toString(), separatorStr, precision, cutOnly);\n    }\n\n    if (precision === 0) {\n      return numberWithoutDecimal;\n    }\n\n    return \"\".concat(numberWithoutDecimal).concat(separatorStr).concat(decimalStr.padEnd(precision, '0').slice(0, precision));\n  }\n\n  if (precisionDecimalStr === '.0') {\n    return numberWithoutDecimal;\n  }\n\n  return \"\".concat(numberWithoutDecimal).concat(precisionDecimalStr);\n}"],"mappings":"AAAA,OAAOA,eAAe,MAAM,2CAA2C;AACvE,OAAOC,YAAY,MAAM,wCAAwC;AACjE,OAAOC,eAAe,MAAM,2CAA2C;;AAEvE;AACA,SAASC,kBAAkB,EAAEC,GAAG,EAAEC,OAAO,EAAEC,U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